﻿
using Microsoft.AspNetCore.Authorization;
using Simple.CMS.Core;

namespace Simple.CMS.Web.Authorization
{
    /// <summary>
    /// 授权的必要条件
    /// </summary>
    public class AuthorizationRequirement: IAuthorizationRequirement
    {
        /// <summary>
        /// 登录名
        /// </summary>
        public string LoginName;

        /// <summary>
        /// 用户Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 显示名
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public UserRole Role { get; set; }
    }
}
